import { Button, Result } from "@arco-design/web-react";
import { useNavigate } from "@tanstack/react-router";
import React from "react";

const NotFound: React.FC = () => {
	const navigate = useNavigate();

	const backToHome = () => navigate({ to: "/" });

	return (
		<Result
			status="404"
			title="404"
			subTitle="Sorry, the page you visited does not exist."
			extra={<Button onClick={backToHome}>返回首页</Button>}
		/>
	);
};

export default React.memo(NotFound);
